<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>R4R - Readiness for Ref</title>
<link href="<%= request.getContextPath() %>/css/r4r.css" type="text/css" rel="stylesheet" media="screen" />
<link href="<%= request.getContextPath() %>/css/custom-theme/jquery-ui-1.8.12.custom.css" type="text/css" rel="stylesheet" media="screen" />
<script type="application/javascript" src="<%= request.getContextPath() %>/js/jquery-1.5.2.min.js"></script>
<script type="application/javascript" src="<%= request.getContextPath() %>/js/jquery-ui-1.8.12.custom.min.js"></script>
<script type="application/javascript" src="<%= request.getContextPath() %>/js/jquery.tmpl.min.js"></script>
<script type="application/javascript" src="<%= request.getContextPath() %>/js/jquery.cookie.js"></script>
<script type="application/javascript" src="<%= request.getContextPath() %>/js/demo.js"></script>
<script id="row-template" type="text/x-jquery-tmpl">
<tr class="search_item \${oddeven}" id="item_\${pid}" page-data="\${page}">
    <td>
        <input type="checkbox" class="export_pid" name="pid" value="\${pid}" id="pid_\${pid}">
    </td>
	<td class="title">
        <label for="pid_\${pid}">\${title}</label>
	</td>
    <td class="creator">\${creator}</td>
    <td class="date">\${date}</td>
	<td><a target="_blank" href="http://localhost:8080/fedora/get/\${pid}" title="View Fedora Info">fedora info</a></td>
</tr>	
</script>

</head>
<body>
	<div id="header">
		<h1>R4R - Readiness for Ref</h1>
	</div>
    <div id="search">
        <form method="get" id="search_form">
            <div class="form_field">
                <label>Search Term</label>
                <input type="text" id="search_term" name="search_term" value="<%= request.getParameter("search_term") == null ? "" : request.getParameter("search_term") %>"/>
                <select name="search_by" id="search_by">
                    <option value="all">all fields</option>
                    <option value="title">title</option>
                    <option value="creator">creator</option>
                </select>
              <input type="submit" id="submit_search" value="Search" />			
                <input type="submit" id="resume_search" value="More..."  disabled="disabled" />			
                <button class="prev_page" value=">" disabled="disabled">&lt;</button>
                <button class="next_page" value="<" disabled="disabled">&gt;</button>			
                <label for="per_page">Results Per Page</label>                
                <select name="per_page" id="per_page">
                    <option value="10">10</option>
                    <option value="25">25</option>
                    <option value="50">50</option>
                    <option value="100">100</option>
                </select>                
                <img class="spinner hidden" id="searching" src="<%= request.getContextPath() %>/images/searching.gif" />
            </div>
        </form>

    </div>
    <form method="get" action="/r4r/Cerif4Ref" target="_blank" id="export_form">
        <table id="list">	
            <tr>
                <th><input type="checkbox" id="check_all" title="Check all items on this page" /></th>
                <th>Title</th>
                <th>Author(s)</th>
                <th>Date</th>
                <th></th>
            </tr>
        </table>

        <div id="export">
            <input type="submit" id="submit_export" value="Export" disabled="disabled" />
            <input type="hidden" id="zip" name="zip" value="false" />
            <div class="form_field right">
                <input type="checkbox" id="checkzip" value="zip" />
                <label for="checkzip">Zip Output</label>
            </div>
            <div>Items selected: <span id="selected_count">0</span></div>
            <span class="clear"></span>
        </div>
    </form>
</body>
</html>
